package com.example.yibu.account;

import lombok.Getter;

@Getter
public enum GentKeyEn {
    ACCOUNT_ONE("AKID1yokipmoR8h0CE5iEvas20saAez2A0dA","AKA6b0dN2UpKe1HUaUDqSvmtuoZ8lKmAMdA"),
    ACCOUNT_TWO("AKID2yokiumoR8h4CE5iEvas20saAez3A0dB","AKB6b0dN2UpKe1HUaUDqSvmtuoZ8lKmAMdB"),
    ACCOUNT_THREE("AKID3ytkiomoR8h5CE5iEvas20saAez4A0dC","AKC6b0dN2UpKe1HUaUDqSvmtuoZ8lKmAMdC");
    private final String key;
    private final String value;
    GentKeyEn(String key,String value) {
        this.key = key;
        this.value = value;
    }

    public static String getValueDriveKey(String key) {
        //使用 values() 方法获取 GentKeyEn 枚举类中定义的所有实例的数组
        GentKeyEn[] gentkeyen = values();
        for (GentKeyEn yen: gentkeyen) {
            if (yen.getKey().equals(key)) {
                return yen.getValue();
            }
        }
        return null;
    }
}
